::WS::Utils::ServiceTypeDef Client FreshBookApi ItemDefinition {
    name            {type string minOccurs 1 maxOccurs 1}
    description     {type string minOccurs 0 maxOccurs 1}
    unit_cost       {type string minOccurs 0 maxOccurs 1}
    quantity        {type string minOccurs 0 maxOccurs 1}
    inventory       {type string minOccurs 0 maxOccurs 1}
}

::WS::Utils::ServiceTypeDef Client FreshBookApi ItemUpdate {
    item_id         {type string minOccurs 1 maxOccurs 1}
    name            {type string minOccurs 1 maxOccurs 1}
    description     {type string minOccurs 0 maxOccurs 1}
    unit_cost       {type string minOccurs 0 maxOccurs 1}
    quantity        {type string minOccurs 0 maxOccurs 1}
    folder          {type string minOccurs 0 maxOccurs 1}
    inventory       {type string minOccurs 0 maxOccurs 1}
}


::WS::Utils::ServiceTypeDef Client FreshBookApi ItemListArray {
    item    {type ItemUpdate()}
}


::WS::Client::DefineRestMethod FreshBookApi item item.create {
    item    {type ItemDefinition}
} {
    item_id {type string}
}

::WS::Client::DefineRestMethod FreshBookApi item item.update {
    item    {type ItemUpdate}
} {}

::WS::Client::DefineRestMethod FreshBookApi item item.get {
    item_id {type string}
} {
    item    {type ItemUpdate}
}

::WS::Client::DefineRestMethod FreshBookApi item item.delete {
    item_id {type string}
} {
}

::WS::Client::DefineRestMethod FreshBookApi item item.list {
    page        {type string minOccurs 0 maxOccurs 1}
    per_page    {type string minOccurs 0 maxOccurs 1 default 25}
    folder      {type string minOccurs 0 maxOccurs 1}
} {
    items    {type ItemListArray}
}
